<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('process_flows', function (Blueprint $table) {
            $table->id('flow_id');
            $table->string('flow_name')->default('')->comment('工作流名称');
            $table->string('product_id')->default('')->comment('产品名称');
            $table->string('version')->default('')->comment('版本');
            $table->string('description')->default('')->comment('描述');
            $table->tinyInteger('status')->default(0)->comment('状态：1-启用, 0-停用');
            $table->timestamp('start')->nullable()->comment('开始时间');
            $table->timestamp('end')->nullable()->comment('结束时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('process_flows');
    }
};
